package com.jt.demo5.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.sql.SQLOutput;

@Component
@Aspect
@Order(1)
public class SpringAOP2 {
    @Around("@annotation(com.jt.demo5.anno.CGB2108)")
public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("环绕开始");
        Object proceed = joinPoint.proceed();
        System.out.println("环绕结束");
        return proceed;
    }
}
